
<%-------------------------------------------------------------------
 * 页面名称：/page/transaction/refundTransList.jsp
 * 功能描述：担保退款页面
 * Action  : 
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%@ page import="cn.agiledata.bank.common.util.Constant"%>
<%@ page import="cn.agiledata.bank.account.service.IAccountConst"%>
<%@ page import="cn.agiledata.bank.account.service.AccountSummary"%>
<%
	String path = request.getContextPath();
	AccountSummary user = (AccountSummary) session
			.getAttribute(Constant.SESSION_ACCOUNT_SUMMARY);
%>
<script language=javascript src="<%=path%>/js/popcalendar.js"></script>
<script language="javascript">
function initAdvanced(){
    var advancedCondition1 = document.getElementById("advancedCondition1");
    advancedCondition1.style.display = document.forms[0].showAdvanced.value;
    var advancedCondition2 = document.getElementById("advancedCondition2");
    advancedCondition2.style.display = document.forms[0].showAdvanced.value;
}
function searchIt(){
    var o =document.forms[0].all;
    for(var i=0;i<o.length;i++){
        var dis =o[i].style.display ;
        if(dis!="undefine"&&dis=="none"){
            o[i].style.display="block";
        }
        if(dis!="undefine"&&dis=="block"){
            o[i].style.display="none";
        }
    }
    if(document.forms[0].showAdvanced.value=="none"){
        document.forms[0].showAdvanced.value="block";
    }else{
        document.forms[0].showAdvanced.value="none";
    }
}
function id_keyup(txtinput){
    txtinput.value=txtinput.value.replace(/(^\s*)|(\s*$)/g, "");
}
function doSearch(){
            var beginDateObj = getObj('beginDate');
            if (beginDateObj.value!="") {
                if (!checkDateInput(beginDateObj)) {
                    return;
                }
            }
            
            var endDateObj = getObj('endDate');
            if (endDateObj.value!="") {
                if (!checkDateInput(endDateObj)) {
                    return;
                }
                if (beginDateObj.value!="") {
                    if (compareDate(beginDateObj.value, endDateObj.value)<0) {
                        alert("起始日期不能大于结束日期！");
                        return;
                    }
                }
            }
    var amountMin = getObj('minAmount').value;
    var amountMax = getObj('maxAmount').value;
    if(isNaN(amountMin)==true){
        alert("请输入数字！");
        getObj('minAmount').focus();
        getObj('minAmount').value="";
        return;
    }
    if(isNaN(amountMax)==true){
        alert("请输入数字！");
        getObj('maxAmount').focus();
        getObj('maxAmount').value="";
        return;
    }
    document.forms[0].submit();
}
function onBodyLoad(){
    initAdvanced();
}
</script>
<div id="main">
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<html:form action="refundQuery" method="post">
				<logic:present parameter="showAdvanced">
					<bean:parameter id="showAdvanced" name="showAdvanced" />
					<input type="hidden" name="showAdvanced"
						value="<bean:write name="showAdvanced"/>">
				</logic:present>
				<logic:notPresent parameter="showAdvanced">
					<input type="hidden" name="showAdvanced" value="none">
				</logic:notPresent>
				<div class="titleinfo">
					退款交易查询
				</div>
				<div class="edit_pass">
					<table width="100%" border="0" align="center" cellpadding="3"
						cellspacing="1">
						<!--请选择账户名称  -->
						<tr>
							<td width="18%" align="right">
								请选择账户名称：
							</td>
							<td width="30%" bgcolor="#FFFFFF">
								<div class="select">
									<div>
										<html:select property="subAccountId">
											<html:option value="">所有账户</html:option>
											<html:optionsCollection name="subAccounts"
												label="accountName" value="id" />
										</html:select>
									</div>
								</div>
							</td>
							<!-- 请选择交易类型 -->
							<td width="18%" align="right">
								请选择交易类型：
							</td>
							<td width="30%" bgcolor="#FFFFFF">
								<div class="select">
									<div>
										<html:select property="transStatus">
											<html:option value="">不限</html:option>
											<html:optionsCollection name="transStatusList"
												label="listName" value="id.listId" />
										</html:select>
									</div>
								</div>
							</td>
						</tr>
						<!--交易日期  -->
						<tr>
							<td width="18%" align="right">
								交易日期：
							</td>
							<td width="30%" bgcolor="#FFFFFF" colspan="3">
								从
								<span class="qzt"><ad:calendar property="beginDate"
										path="<%=path%>" /> </span> 到
								<span class="qzt"><ad:calendar property="endDate"
										path="<%=path%>" /> </span>
							</td>
							
						</tr>
						<!--交易对方/交易编号  -->
						<tr id="advancedCondition1" style="display:none">
							<td width="18%" align="right">
								交易对方：
							</td>
							<td width="30%" bgcolor="#FFFFFF">
								<html:text styleClass="inputStyle" property="peerAccount"
									onkeyup="id_keyup(this)" />
							</td>
							<td width="18%" align="right">
								交易编号：
							</td>
							<td width="30%" bgcolor="#FFFFFF">
								<html:text styleClass="inputStyle" property="transId"
									onkeyup="id_keyup(this)" />
							</td>
						</tr>
						<!-- 交易金额 -->
						<tr>
							<td width="18%" align="right">
								交易金额：
							</td>
							<td width="30%" bgcolor="#FFFFFF">
								从
								<span class="qzt"><html:text styleClass="inputStyle"
										size="10" property="minAmount" onkeyup="id_keyup(this)" /> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;到
								<span class="qzt"><html:text styleClass="inputStyle"
										size="10" property="maxAmount" onkeyup="id_keyup(this)" /> </span>
							</td>
							<td colspan="2" bgcolor="#FFFFFF">
								&nbsp;
							</td>
						</tr>
						<tr>
							<td colspan="4" align="right"
								background="../../images/bg_table.gif" bgcolor="#FFFFFF">
								<hr size="1" style="color:#88A7C0;" />
							</td>
						</tr>
						<tr>
							<td colspan="4" align="center" bgcolor="#FFFFFF">
								<span class="button_Frame"> <input type="button"
										value="查 询" class="graybutton_style" onclick="doSearch()"
										style="margin-right:10px;" /> </span>
							</td>
						</tr>
					</table>
					<br />
					<table width="100%" class="tablestyle">
						<tr>
							<th>
								<span class="blue14">交易编号</span>
							</th>
							<th>
								<span class="blue14">交易对方</span>
							</th>
							<th>
								<span class="blue14">交易时间</span>
							</th>
							<th>
								<span class="blue14">交易状态</span>
							</th>
							<th>
								<span class="blue14">金额</span>
							</th>
						</tr>
						<c:forEach var="aqb" items="${result.data}" varStatus="status">
							<c:if test="${status.index % 2 == 0}">
								<tr height="28" align="center" class="tableWhiteBg">
							</c:if>
							<c:if test="${status.index % 2 == 1}">
								<tr height="28" align="center" class="tableBlueBg">
							</c:if>
							<td>
								<a
									href="<%=path%>/page/transaction/accountHisQueryDetail.do?transactionID=<bean:write name="aqb" property="id"/>"
									class="bluefont12u"> <bean:write name="aqb"
										property="transId" /> </a>
								<a
									href="<%=path%>/page/transaction/accountHisQueryDetail.do?transactionID=<bean:write name="aqb" property="id"/>"
									class="bluefont12u"></a>
							</td>
							<td>
								<a
									href="<%=path%>/page/common/getAccount.do?accountId=<bean:write name="aqb" property="credit.account.id"/>"
									class="bluefont12u"> <bean:write name="aqb"
										property="credit.account.name" /> <logic:empty name="aqb"
										property="credit.account.name">
										<bean:write name="aqb" property="credit.account.email" />
										<logic:empty name="aqb" property="credit.account.email">
											<bean:write name="aqb" property="credit.account.mobile" />
										</logic:empty>
									</logic:empty> </a>
								<a
									href="<%=path%>/page/common/getAccount.do?accountId=<bean:write name="aqb" property="credit.account.id"/>"
									class="bluefont12u"></a>
							</td>
							<td>
								<bean:write name="aqb" format="yyyy-MM-dd HH:mm:ss"
									property="beginDate" />
							</td>
							<td>
								<ad:write typeid="TRANS_STATUS" name="aqb"
									property="transStatus" />
							</td>
							<td>
								<bean:write name="aqb" property="amount" format="#0.00" />
								元
							</td>
							</tr>
						</c:forEach>
					</table>
					<table width="100%" height="30" border="0" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="25" align="center" class="font_blue">
								<ad:PageBean name="result" />
							</td>
						</tr>
					</table>
				</div>
			</html:form>
		</div>
	</div>
</div>
